package com.mibotiquin.alarmas;

import com.mibotiquin.DbHelper.DatabaseItem;

public class ItemCad implements DatabaseItem {
	
	private int id;
	private String idM;
	private String name;
	private String date;
	private boolean showAl;
	private boolean remAl;

	public ItemCad(String[] data) {
		
		id = Integer.parseInt(data[0]);
		idM = data[1];
		name = data[2];
		date = data[3];
		showAl = Boolean.getBoolean(data[4]);
		remAl = Boolean.getBoolean(data[5]);
	}

	public ItemCad() {
		// TODO Auto-generated constructor stub
	}

	@Override
	public String[] getCamposArray() {
		String[] campos = {"id", "idM", "name", "date", "showAl", "remAl"};
		return campos;
	}

	@Override
	public String[] getDatosArray() {
		String[] campos = { String.valueOf(id), idM, name, date, String.valueOf(showAl), 
							String.valueOf(remAl)};
		return campos;
	}

	@Override
	public String getNombreTabla() {
		return "cad";
	}

	@Override
	public DatabaseItem getInstance(String[] data) {
		return new ItemCad(data);
	}

}
